import Sequelize from 'sequelize';

//连接数据库并导出
export const sequelize = new Sequelize('store','root','123456',
    {
        host:'localhost',
        dialect:'mysql',
        logging:false,
    }
)
//测试连接
sequelize.authenticate()
.then(()=>{
    console.log('数据库连接成功！');
    
}).catch(err=>{
    console.log('数据库连接失败：',err);
    
})